Otherwise this broke atomicity; we could fetch/store the ref, then
crash, and then not upgrade the next time we tried upgrading.
The correct model is: the tree has changed if the new ref is different
from the merge deployment.
gboolean ret = FALSE;
gs_unref_object OstreeRepo *repo = NULL;
char *refs_to_fetch[] = { self->origin_ref, NULL };
- gs_free char *from_revision = NULL;
+ const char *from_revision = NULL;
gs_free char *new_revision = NULL;
gs_free char *origin_refspec = NULL;
else
origin_refspec = g_strdup (self->origin_ref);
- if (!ostree_repo_resolve_rev (repo, origin_refspec, TRUE, &from_revision,
- error))
- goto out;
+ g_assert (self->merge_deployment);
+ from_revision = ostree_deployment_get_csum (self->merge_deployment);
if (self->origin_remote)
{